package com.cyy.dyeing.common;

import lombok.Data;

/**
 * @Author: cyy
 * @Date: 2024/7/22
 * 数据状态
 */
public enum DataStatusEnum {
    UNDETERMINED("00", "未确定"),
    DETERMINED("22", "确定"),
    ACTIVE("55", "启动"),
    DISABLED("77", "禁止"),
    DELETE("99", "逻辑删除");

    private String code;
    private String name;

    DataStatusEnum(String code, String name){
        this.code = code;
        this.name = name;
    }
    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public static String getStatusName(String code){
        DataStatusEnum[] values = DataStatusEnum.values();
        for (DataStatusEnum value :values) {
            if(value.code.equals(code)){
                return value.name;
            }
        }
        return null;
    }

}
